package com.iotechn.unimall.data.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.iotechn.unimall.data.domain.WarehouseLossGoodsDO;
import com.iotechn.unimall.data.dto.excel.SkuTotalPriceDTO;
import com.iotechn.unimall.data.dto.warehouse.WarehouseLossGoodsDTO;
import org.apache.ibatis.annotations.Param;

import java.util.List;


/**
 * 仓库损耗商品表
 *
 * @author wxw
 * @email
 * @date 2020-04-13 13:05:53
 */
public interface WarehouseLossGoodsMapper extends BaseMapper<WarehouseLossGoodsDO> {

    //查询商品（包含当前库的商品数量）
    List<WarehouseLossGoodsDTO> querySkusByWarehouseId(@Param("warehouseId") Long warehouseId, @Param("skuIds") List<Long> skuIds, @Param("offset") Integer offset, @Param("size") Integer size, @Param("search") String search);

    //统计
    Integer countSkusByWarehouseId(@Param("warehouseId") Long warehouseId, @Param("skuIds") List<Long> skuIds, @Param("search") String search);


    //统计商品
    List<WarehouseLossGoodsDTO> querySkusByPara(@Param("warehouseId") Long warehouseId, @Param("lossCheckId") Long lossCheckId, @Param("offset") Integer offset, @Param("size") Integer size, @Param("search") String search);

        List<SkuTotalPriceDTO> summaryGoods(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("skuIds") List<Long> skuIds, @Param("barCodes") List<String> barCodes,@Param("lossType") Integer lossType);

}
